﻿
@using LeadThing.AbpZeroTemplate.Localization
@* 这里是通过ng的控制权去查找相对应的js信息。所有我们的没一个js文件就是单独的一个控制权。。。尼玛angular设计太爽了。。。 *@
<div ng-controller="common.views.disputeInformationHandles.fenXiYanPan as vm">
    <div class="row margin-bottom-5">
        <div class="col-xs-6">
            <div class="page-head">
                <div class="page-title">
                    <h1>
                        <span>分析研判</span> <small>分析研判列表</small>
                    </h1>
                </div>
            </div>
        </div>
    </div>
    <div class="portlet light margin-bottom-0">
        <div class="portlet-body">
            <div class="form">
                <form class="horizontal-form">
                    <div class="form-body" enter-key="vm.getPageddisputeInformations()">
                        <div class="row margin-bottom-10">
                            <div class="col-md-12">
                                <div class="inputs inputs-full-width">
                                    @* 用于控制input的组件 *@
                                    <div class="portlet-input">
                                        <div class="input-group">
                                            @*添加搜索按钮，匹配后端DTO的filterText字段  *@
                                            <input ng-model="vm.filterText" auto-focus class="form-control" placeholder="@L("SearchUploadName")" type="text">
                                            @* 在文本框后面添加个搜素图片按钮 *@
                                            <span class="input-group-btn">
                                                <button ng-click="vm.getPageddisputeInformations()" class="btn default" type="submit"><i class="icon-magnifier"></i></button>
                                            </span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        @* 以下是高级过滤功能 *@
                        <div class="row margin-bottom-10" ng-if="vm.advancedFiltersAreShown">
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label class="control-label">@L("Party")</label>
                                    <input type="text" class="form-control" placeholder="@L("Party")" ng-model="vm.party">
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label class="control-label">@L("DateRange")</label>
                                    <input date-range-picker type="text" options="vm.dateRangeOptions" min="vm.dateRangeOptions.min" max="vm.dateRangeOptions.max" class="form-control date-picker" ng-model="vm.dateRangeModel" />
                                </div>
                            </div>
                            <div class="col-md-4">
                                <div class="form-group">
                                    <label class="control-label">@L("TownID")</label>
                                    <select name="TownID" class="form-control" ng-change="vm.bindArea(vm.requestParams.townID)" ng-model="vm.requestParams.townID" >
                                        <option ng-repeat="x in vm.townList" value="{{x.id}}">{{x.title}}</option>
                                    </select>
                                </div>
                            </div>
                            <div class="col-md-4">
                                <div class="form-group">
                                    <label class="control-label">@L("AreaID")</label>
                                    <select name="AreaID" class="form-control" ng-model="vm.requestParams.areaID" ng-change="vm.bindVillage(vm.requestParams.areaID)">
                                        <option ng-repeat="x in vm.areaList" value="{{x.id}}">{{x.title}}</option>
                                    </select>
                                </div>
                            </div>

                            <div class="col-md-4">
                                <div class="form-group">
                                    <label class="control-label">@L("VillageID")</label>
                                    <select name="VillageID" class="form-control" ng-model="vm.requestParams.villageID">
                                        <option ng-repeat="x in vm.villageList" value="{{x.id}}">{{x.title}}</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                    </div>
                    @*//这里根据实际情况修改吧。*@
                    <div class="row margin-bottom-10">
                        <div class="col-sm-6">
                            <span class="clickable-item text-muted" ng-if="!vm.advancedFiltersAreShown" ng-click="vm.advancedFiltersAreShown=!vm.advancedFiltersAreShown"><i class="fa fa-angle-down"></i> @L("ShowAdvancedFilters")</span>
                            <span class="clickable-item text-muted" ng-if="vm.advancedFiltersAreShown" ng-click="vm.advancedFiltersAreShown=!vm.advancedFiltersAreShown"><i class="fa fa-angle-up"></i> @L("HideAdvancedFilters")</span>
                        </div>
                        <div class="col-sm-6 text-right">
                            <button class="btn btn-default" ng-click="vm.compareStatistics()"><i class="fa fa-file-zip-o"></i> 时间比较统计</button>
                            <button class="btn btn-default" ng-click="vm.townbarChart()"><i class="fa fa-file-zip-o"></i> 乡镇纠纷统计</button>
                            <button class="btn btn-default" ng-click="vm.pingAnWuShi()"><i class="fa fa-file-zip-o"></i> 平安无事</button>
                            <button class="btn btn-default" ng-click="vm.barChart()"><i class="fa fa-file-zip-o"></i> 柱状图数据</button>
                            <button class="btn btn-default" ng-click="vm.pie()"><i class="fa fa-file-zip-o"></i> 饼图数据</button>
                            <button class="btn btn-default" ng-click="vm.timeStatistics()"><i class="fa fa-file-zip-o"></i> 时间统计</button>
                            <button class="btn btn-default" ng-click="vm.exportToExcel()"><i class="fa fa-file-excel-o"></i> @L("ExportToExcel")</button>
                            <button class="btn blue" ng-click="vm.getPageddisputeInformations()"><i class="fa fa-refresh"></i> @L("Refresh")</button>
                        </div>
                    </div>

                </form>
            </div>

            <div busy-if="vm.loading">
                @* 此处考虑了阿拉伯人，他们的是从右往左写的，所以加了个判断 *@
                <div ui-grid="vm.disputeInformationGridOptions" ui-grid-pagination ui-grid-resize-columns dir=@(CultureHelper.IsRtl ? "rtl" : "")></div>
            </div>
        </div>
    </div>
</div>




